package com.dss.auto_deploy.quartz.config;

import org.quartz.Scheduler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;

/**
 * @Description:
 * @author: dongshoushan
 * @date: 2022年11月10日 18:21
 */
@Configuration
public class ScheduleConfig {


    private SchedulerFactoryBean schedulerFactoryBean;

    public ScheduleConfig(SchedulerFactoryBean schedulerFactoryBean) {
        this.schedulerFactoryBean = schedulerFactoryBean;
    }

    @Bean
    public Scheduler scheduler() {
        return schedulerFactoryBean.getScheduler();
    }

}